package cn.jkgly.log.controller;

import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import cn.jkgly.log.entity.WxUserLog;
import cn.jkgly.log.service.IWxUserLogService;
import cn.jkgly.suggest.entity.WxUserSuggest;
import cn.jkgly.wxUser.entity.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;

import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;

/**
 * @Description: wx_user_log
 * @Author: jeecg-boot
 * @Date: 2020-02-10
 * @Version: V1.0
 */
@RestController
@RequestMapping("/log/wxUserLog")
@Slf4j
public class WxUserLogController {
    @Autowired
    private IWxUserLogService wxUserLogService;

    /**
     * 提交建议
     *
     * @param userLog
     * @return
     */
    @PostMapping(value = "/PostLog")
    @ResponseBody//这个注解意味着这个方法的返回值不是页面名称，而是同一次请求的返回体（也就是服务器返回给客户端的数据）
    public Result<?> PostGuggest(@RequestBody WxUserLog userLog) {
        System.out.println(userLog);
        userLog.setCreatetime(new Date());
		wxUserLogService.save(userLog);
        return Result.ok(userLog);
    }
}
